

function addSensorbitCod(Blockly) {




    //人体热释电传感器模块
    Blockly.Python.microbit_body = function(block) {
        var dropdown_body = this.getFieldValue('body');
        Blockly.Python.definitions_['import_microbit'] = 'from microbit import *';
        Blockly.Python.definitions_['import_PIR'] = 'from sensor import human_body';
        var code = "human_body.is_detected("+ dropdown_body +")";
        return [code];
      }

    return Blockly;
}

module.exports = addSensorbitCod;

